package com.file.system.entity.system;


import com.file.system.entity.basic.WebBasic;
import com.file.system.plugin.validated.SQLInjectionValidation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.io.Serializable;


/**
 * 角色关联菜单
 *
 * @author jch
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class WebRoleMenu extends WebBasic implements Serializable {

    private static final long serialVersionUID = 1L;


    //新增
    public interface add extends Default {
    }

    //修改
    public interface update extends Default {
    }

    /**
     * id
     */
    @NotNull(groups = {add.class, update.class}, message = "id不能为空")
    @Min(value = 1, message = "id最小1")
    private Long id;
    /**
     * 角色id
     */
    @NotNull(groups = {add.class, update.class}, message = "角色id不能为空")
    @Min(value = 1, message = "角色id最小1")
    private Long fkRoleId;
    /**
     * 菜单id
     */
    @NotNull(groups = {add.class, update.class}, message = "菜单id不能为空")
    @Min(value = 1, message = "菜单id最小1")
    private Long fkMenuId;
}
